import request from '@/api/socialized-servce/index.js' //引入http.js
const api = request

export default {
	
	// 获取政策分类
	queryByConditionArticleType(params){
		let url = 'socialized-policy/policyType/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取政策列表
	queryByConditionArticle(params){
		let url = 'socialized-policy/policy/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取政策列表 分页
	queryPageByConditionArticle(params){
		let url = 'socialized-policy/policy/queryPageByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取政策详情
	queryByIdArticle(params) {
		let url = 'socialized-policy/policy/queryById'
		return api.request(url, 'get', params)
	},
	// 政策发布评论
	commentPolicy(params){
		const url = "socialized-policy/policy/comment"
		return api.request(url,'post',{
			...params
		})
	},
	// 政策查询评论
	queryCommentPolicy(policyId){
		const url = `socialized-policy/policy/${policyId}/comment`
		return api.request(url, 'get')
	},
	// 政策解读 分页
	queryPageByConditionInterpret(params){
		let url = 'socialized-policy/policyInterpretation/queryPageByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 政策解读详情
	queryByIdInterpret(params) {
		let url = 'socialized-policy/policyInterpretation/queryById'
		return api.request(url, 'get', params)
	},
	// 政策解读发布评论
	commentInter(params){
		const url = "socialized-policy/policyInterpretation/comment"
		return api.request(url,'post',{
			...params
		})
	},
	// 政策解读查询评论
	queryCommentInter(policyInterpretationId){
		const url = `socialized-policy/policyInterpretation/${policyInterpretationId}/comment`
		return api.request(url, 'get')
	},
	
	// 政策意见 分页
	queryPageByConditionOpinion(params){
		let url = 'socialized-policy/policyOpinion/queryPageByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 政策意见详情
	queryByIdOpinion(params) {
		let url = 'socialized-policy/policyOpinion/queryById'
		return api.request(url, 'get', params)
	},
	// 政策意见发布评论
	commentOpinion(params){
		const url = "socialized-policy/policyOpinion/comment"
		return api.request(url,'post',{
			...params
		})
	},
	// 政策意见查询评论
	queryCommentOpinion(policyOpinionId){
		const url = `socialized-policy/policyOpinion/${policyOpinionId}/comment`
		return api.request(url, 'get')
	},
}